package com.vf.cloud.paas.common.log;



import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

import com.vf.cloud.paas.app.master.api.sys.service.IUserLog;
import com.vf.cloud.paas.common.log.aspect.RLogAspect;
import com.vf.cloud.paas.common.log.event.RLogListener;

/**
 * 日志自动配置
 */
@EnableAsync
@RequiredArgsConstructor
@ConditionalOnWebApplication
@Configuration(proxyBeanMethods = false)
public class LogAutoConfiguration {

	@Bean
	public RLogListener sysLogListener(IUserLog userLogImpl) {
		return new RLogListener(userLogImpl);
	}

	@Bean
	public RLogAspect sysLogAspect() {
		return new RLogAspect();
	}

}
